<demo>
基础用法
<p></p>
</demo>
<template>
  <HButton @click="toggle">showDialog</HButton>
  <h-dialog
    v-model:visible="visible"
    :onClickOverlay="false"
    @ok="yes"
    @cancel="no"
  >
    <template v-slot:title>
      <strong>标题</strong>
    </template>
    <template v-slot:content>
      <div>
        <p>内容1</p>
        <p>内容2</p>
      </div>
    </template>
  </h-dialog>
</template>

<script lang="ts">
import { HButton, HDialog } from '../../../lib/index'
import { ref } from 'vue'
export default {
  components: {
    HButton,
    HDialog,
  },
  setup() {
    const visible = ref(false)
    const toggle = () => {
      console.log(123)
      visible.value = !visible.value
    }

    const yes = () => {
      return false
    }

    const no = () => {}

    return { visible, toggle, yes, no }
  },
}
</script>
